﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IndoorPosition.Server.Application
{
    /// <summary>
    /// 楼层信息数据输入对象
    /// </summary>
    public class FloorInputDto
    {
        /// <summary>
        /// 楼层名称
        /// </summary>
        [Required(ErrorMessage = "楼层名称不可为空")]
        [MaxLength(10, ErrorMessage = "楼层名称不能长于10位")]
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// 楼层序号
        /// </summary>
        [Required(ErrorMessage = "楼层编号不可为空")]
        public int Index
        {
            get;
            set;
        }

        /// <summary>
        /// 楼层高程
        /// </summary>
        [Required(ErrorMessage = "楼层高程不可为空")]
        public double Height
        {
            get;
            set;
        }

        /// <summary>
        /// 模型
        /// </summary>
        [Required(ErrorMessage = "模型不可为空")]
        public IFormFile Model
        {
            get;
            set;
        }

        /// <summary>
        /// 模型参照点X坐标
        /// </summary>
        [Required(ErrorMessage = "模型插入参照原点坐标X值不可为空")]
        public double X0
        {
            get;
            set;
        }

        /// <summary>
        /// 模型参照点Y坐标
        /// </summary>
        [Required(ErrorMessage = "模型插入参照原点坐标Y值不可为空")]
        public double Y0
        {
            get;
            set;
        }


        /// <summary>
        /// 模型坐标X0对应的WGS84墨卡托投影坐标
        /// </summary>
        [Required(ErrorMessage = "模型插入点坐标X值不可为空")]
        public double X
        {
            get;
            set;
        }

        /// <summary>
        /// 模型坐标Y0对应的WGS84墨卡托投影坐标
        /// </summary>
        [Required(ErrorMessage = "模型插入点坐标不Y值可为空")]
        public double Y
        {
            get;
            set;
        }


        /// <summary>
        /// 路径
        /// </summary>
        public IFormFile Route
        {
            get;
            set;
        }

        /// <summary>
        /// 建筑物ID
        /// </summary>
        [Required(ErrorMessage = "建筑物ID不可为空")]
        public int BuildingId
        {
            get;
            set;
        }
    }
}
